package com.oolee.cloud.service;

import com.oolee.cloud.entity.Payment;
import com.oolee.cloud.general.GeneralResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE",fallback = FeignServiceFallback.class)
public interface FeignService {

    @GetMapping(value = "cloud/payment/get/{id}")
    GeneralResult<Payment> getPaymentById(@PathVariable("id")Long id);

    @GetMapping(value = "cloud/payment/timeout")
    String TimeOutShow();

    @GetMapping(value = "cloud/payment/exception")
    String requestExceptionService();


}
